Persistent application activation and timer notifications

ABSTRACT

The present invention extends to methods, systems, and computer program products for persistent application activation and timer notifications. A durable instance manager, instance execution hosts, and an instance store interoperate to transition instances between executing and persisted states. System properties are associated with an instance. System properties can define re-activation conditions, that when satisfied, indicate that an instance is to be re-activated for execution. System properties can define timers as well as indications that instances are in a persisted but ready to run state.

CROSS-REFERENCE TO RELATED APPLICATIONS

Not Applicable.

BACKGROUND 1. Background and Relevant Art

Computer systems and related technology affect many aspects of society.Indeed, the computer system's ability to process information hastransformed the way we live and work. Computer systems now commonlyperform a host of tasks (e.g., word processing, scheduling, accounting,etc.) that prior to the advent of the computer system were performedmanually. More recently, computer systems have been coupled to oneanother and to other electronic devices to form both wired and wirelesscomputer networks over which the computer systems and other electronicdevices can transfer electronic data. Accordingly, the performance ofmany computing tasks are distributed across a number of differentcomputer systems and/or a number of different computing environments.

Long-running (e.g., hours, days, or even months) applications, such as,for example, workflow applications, often benefit from periodicallypersisting their work to allow for the application to recover aftererrors, crashes, or machine failures. Persisting work can include movingwork from system memory to secondary (or other) more durable storage.Persisting work permits applications to temporarily go idle and havetheir resources (e.g., system memory) reassigned. To persist work, anapplication host coordinates the persisted state with runtime state toensure that a consistent checkpoint is created. For example, thepersisted state may need to coordinate with application transactions,message notifications, locks, local state caches, etc.

However, long-running applications may also need to be restarted at alater time. That is, a long-running application may need to be movedfrom more durable storage back into system memory. For example, anapplication may anticipate receipt of a message at a designated timeafter being persisted to durable storage. For the application toappropriately receive the message, the application may need to be loadedinto system memory prior to the message arriving. Alternately, a hostexecution environment can fail, resulting in the need to restart anapplication in another execution environment.

BRIEF SUMMARY

The present invention extends to methods, systems, and computer programproducts for persistent application activation and timer notifications.Embodiments of the invention include restarting an application instance,such as, for example, due to a timer firing or due to an execution hostfor the application instance being shut down or failing. In someembodiments, a first instance execution host, from among the one or moreinstance execution hosts, executes an application instance representinga portion of an application. It is determined that the applicationinstance is to be dormant for some amount of time before furtherprocessing of the application instance occurs.

A system property is persisted in an instance store for the applicationinstance. The system property contains information indicating that theapplication instance is to be subsequently re-activated for execution. Asecond instance execution host, from among the one or more instanceexecution hosts, registers with the durable instance manager an interestin receiving event notifications regarding application instances tore-activate. The second instance execution host receives an eventnotification to re-activate the application instance. The eventnotification is responsive to the information contained in the systemproperty persisted in the instance store and registration with thedurable instance manager. The application instance is loaded at thesecond instance execution host in response to receiving the eventnotification to further process the application instance.

In other embodiments, a durable instance manager monitors execution ofan application instance at an instance execution host. The durableinstance manager receives an indication that the application instance isto be subsequently re-activated at an instance execution host at afuture time. The durable instance manager persists a system propertycorresponding to the application instance at the instance store. Thesystem property contains information defining a re-activation conditionthat, when satisfied, is an indication that the application instance isto be re-activated for execution

The durable instance manager detects an event that satisfies there-activation condition subsequent to persisting the system propertycorresponding to the application instance. The durable instance managerreceives registration requests from one or more instance execution hostsfor interest in receiving event notifications regarding applicationinstances to re-activate. The durable instance manager sends an eventnotification to a further instance execution host to re-activate theapplication instance for execution. The event notification is responsiveto detection of the event that satisfies the re-activation condition andthe registration from the instance execution host.

This summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used as an aid in determining the scope of the claimed subjectmatter.

Additional features and advantages of the invention will be set forth inthe description which follows, and in part will be obvious from thedescription, or may be learned by the practice of the invention. Thefeatures and advantages of the invention may be realized and obtained bymeans of the instruments and combinations particularly pointed out inthe appended claims. These and other features of the present inventionwill become more fully apparent from the following description andappended claims, or may be learned by the practice of the invention asset forth hereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to describe the manner in which the above-recited and otheradvantages and features of the invention can be obtained, a moreparticular description of the invention briefly described above will berendered by reference to specific embodiments thereof which areillustrated in the appended drawings. Understanding that these drawingsdepict only typical embodiments of the invention and are not thereforeto be considered to be limiting of its scope, the invention will bedescribed and explained with additional specificity and detail throughthe use of the accompanying drawings in which:

FIG. 1A illustrates an example computer architecture that facilitatesrestarting an instance.

FIG. 1B illustrates another view of the example computer architecture ofFIG. 1A.

FIG. 1C illustrates another view of the example computer architecture ofFIG. 1A.

FIG. 2 illustrates a sequence diagram of instance activation.

FIG. 3 illustrates a flow chart of an example method for re-activatingan instance.

FIG. 4 illustrates a flow chart of an example method for re-activatingan instance.

DETAILED DESCRIPTION

The present invention extends to methods, systems, and computer programproducts for persistent application activation and timer notificationsEmbodiments of the invention include restarting an application instance,such as, for example, due to a timer firing or due to an execution hostfor the application instance being shut down or failing. In someembodiments, a first instance execution host, from among the one or moreinstance execution hosts, executes an application instance representinga portion of an application. It is determined that the applicationinstance is to be dormant for some amount of time before furtherprocessing of the application instance occurs.

A system property is persisted in an instance store for the applicationinstance. The system property contains information indicating that theapplication instance is to be subsequently re-activated for execution. Asecond instance execution host, from among the one or more instanceexecution hosts, registers with the durable instance manager an interestin receiving event notifications regarding application instances tore-activate. The second instance execution host receives an eventnotification to re-activate the application instance. The eventnotification is responsive to the information contained in the systemproperty persisted in the instance store and registration with thedurable instance manager. The application instance is loaded at thesecond instance execution host in response to receiving the eventnotification to further process the application instance.

In other embodiments, a durable instance manager monitors execution ofan application instance at an instance execution host. The durableinstance manager receives an indication that the application instance isto be subsequently re-activated at an instance execution host at afuture time. The durable instance manager persists a system propertycorresponding to the application instance at the instance store. Thesystem property contains information defining a re-activation conditionthat, when satisfied, is an indication that the application instance isto be re-activated for execution

The durable instance manager detects an event that satisfies there-activation condition subsequent to persisting the system propertycorresponding to the application instance. The durable instance managerreceives registration requests from one or more instance execution hostsfor interest in receiving event notifications regarding applicationinstances to re-activate. The durable instance manager sends an eventnotification to a further instance execution host to re-activate theapplication instance for execution. The event notification is responsiveto detection of the event that satisfies the re-activation condition andthe registration from the instance execution host.

Embodiments of the present invention may comprise or utilize a specialpurpose or general-purpose computer including computer hardware, suchas, for example, one or more processors and system memory, as discussedin greater detail below. Embodiments within the scope of the presentinvention also include physical and other computer-readable media forcarrying or storing computer-executable instructions and/or datastructures. Such computer-readable media can be any available media thatcan be accessed by a general purpose or special purpose computer system.Computer-readable media that store computer-executable instructions arephysical storage media. Computer-readable media that carrycomputer-executable instructions are transmission media. Thus, by way ofexample, and not limitation, embodiments of the invention can compriseat least two distinctly different kinds of computer-readable media:computer storage media and transmission media.

Computer storage media includes RAM, ROM, EEPROM, CD-ROM or otheroptical disk storage, magnetic disk storage or other magnetic storagedevices, or any other medium which can be used to store desired programcode means in the form of computer-executable instructions or datastructures and which can be accessed by a general purpose or specialpurpose computer.

A “network” is defined as one or more data links that enable thetransport of electronic data between computer systems and/or modulesand/or other electronic devices. When information is transferred orprovided over a network or another communications connection (eitherhardwired, wireless, or a combination of hardwired or wireless) to acomputer, the computer properly views the connection as a transmissionmedium. Transmissions media can include a network and/or data linkswhich can be used to carry or desired program code means in the form ofcomputer-executable instructions or data structures and which can beaccessed by a general purpose or special purpose computer. Combinationsof the above should also be included within the scope ofcomputer-readable media.

Further, upon reaching various computer system components, program codemeans in the form of computer-executable instructions or data structurescan be transferred automatically from transmission media to computerstorage media (or vice versa). For example, computer-executableinstructions or data structures received over a network or data link canbe buffered in RAM within a network interface module (e.g., a “NIC”),and then eventually transferred to computer system RAM and/or to lessvolatile computer storage media at a computer system. Thus, it should beunderstood that computer storage media can be included in computersystem components that also (or even primarily) utilize transmissionmedia.

Computer-executable instructions comprise, for example, instructions anddata which, when executed at a processor, cause a general purposecomputer, special purpose computer, or special purpose processing deviceto perform a certain function or group of functions. The computerexecutable instructions may be, for example, binaries, intermediateformat instructions such as assembly language, or even source code.Although the subject matter has been described in language specific tostructural features and/or methodological acts, it is to be understoodthat the subject matter defined in the appended claims is notnecessarily limited to the described features or acts described above.Rather, the described features and acts are disclosed as example formsof implementing the claims.

Those skilled in the art will appreciate that the invention may bepracticed in network computing environments with many types of computersystem configurations, including, personal computers, desktop computers,laptop computers, message processors, hand-held devices, multi-processorsystems, microprocessor-based or programmable consumer electronics,network PCs, minicomputers, mainframe computers, mobile telephones,PDAs, pagers, routers, switches, and the like. The invention may also bepracticed in distributed system environments where local and remotecomputer systems, which are linked (either by hardwired data links,wireless data links, or by a combination of hardwired and wireless datalinks) through a network, both perform tasks. In a distributed computingenvironment, program modules may be located in both local and remotememory storage devices.

FIG. 1A illustrates an example computer architecture 100 thatfacilitates restarting instances. Accordingly, computer architecture 100can represent a distributed computing environment where a commonapplication pattern takes the overall state of a system and breaks theoverall state into discrete instances. Each instance represents ameaningful and, at least partially, autonomous unit of state andassociated application logic. Computer architecture 100 also providesinfrastructural support for managing instances in both an executingstate and a persisted state.

An instance in an executing state is in system memory and usingprocessor resources. An instance in a persisted state is dormant andmoved (e.g., temporarily) to more durable (secondary) storage, such as,for example, to disk. Thus, within computer architecture 100, instancescan move from a persisted state to an executing state as a result of anexternal stimulus (e.g., external events 108), such as the arrival of anapplication message from another system or as a result of internalevents. Workflow is one example of a program execution technology thatcan be hosted and managed using both executing and persisted states.

As depicted, computer architecture 100 includes durable instance manager101, instance execution host 102, and instance store 103. Each of thecomponents is connected to one another over (or is part of) a network,such as, for example, a Local Area Network (“LAN”), a Wide Area Network(“WAN”), and even the Internet. Accordingly, each of the depictedcomputer systems as well as any other connected computer systems andtheir components, can create message related data and exchange messagerelated data (e.g., Internet Protocol (“IP”) datagrams and other higherlayer protocols that utilize IP datagrams, such as, Transmission ControlProtocol (“TCP”), Hypertext Transfer Protocol (“HTTP”), Simple MailTransfer Protocol (“SMTP”), etc.) over the network.

Generally, instance execution host 102 contains the logic necessary forthe in-memory runtime execution of the instance. Instance store 103 isconfigured to physically hold the data for instances that are in apersisted state. Durable instance manager 101 is situated logicallybetween the instance execution host 102 and instance storage 103 andcoordinates their interaction. Durable instance manager 101 receivesload and save operation requests (load/save operations 104) frominstance execution hosts 102 and forwards these (load/save operations106) to instance store 103. Durable instance manager 101 is alsoconfigured to send internal activation events (e.g., activation events107) to activate instance execution hosts to process specifiedinstances.

Generally, if an event occurs and the applicable instance happens to bein memory in the executing state, then that event is directed to theinstance by the instance execution host 102 and handled appropriately bythe associated application code. However, if the event occurs and theinstance is in a persisted state in instance store 103, instanceexecution host 102 sends a request to instance store 103 to load theapplicable instance.

Durable instance manager 101 is configured to be aware of the state ofinstances in the system at any time, including whether an instance isexecuting in an instance execution host or is persisted in instancestore 103. Durable instance manager 101 is also configured to be awareof which instance execution host an instance is executing at. Durableinstance manager 101 is also configured to track the availability andstate (as to what instance types are available) of the set of instanceexecution hosts.

As previously described, there are different sources for events,including internal and external. An example of an external event is thearrival of an application message at an instance execution host. For anexternal event, an instance execution host loads the instance and thengives it the message. The instance may then handle the event by updatingits state and then starting to wait on another application event. Insuch a case the instance “goes idle”. In response, the instanceexecution host attempts to unload or save idle instances. In order toavoid thrashing, an instance execution host may also wait for a timeinterval prior to unloading the instance.

Internal events include activation events. For example, based onmonitoring, durable instance manager 101 can determines that aparticular instance is to be running in an instance execution host.Durable instance manager 101 can then send activation events (e.g.,activation events 107) to one of the instance execution hosts (e.g.,instance execution host 102) it knows about.

Activation events may occur at one or more of two levels, at an instancetype level and at the instance level. Generally, an instance type is thedefinition of the particular program code for the instance. On the otherhand, an instance is the actual data for a particular instance. Typelevel activation can be integrated with hosting infrastructure in adifferent way than instance level activation. Durable instance manager101 can send a type level event to make the instance type available.Then, once the type is available, durable instance manager 101 can sendan instance level event to activate an instance.

FIG. 2 illustrates a sequence diagram 200 of instance activation. Asdepicted, durable instance manager 201 sends activate instance Type A toinstance execution host 202. Instance execution host 202, returns anindication of readiness to accept instance events for instance Type A.Durable instance manager 201 then sends activate Instance 123 of Type Ato instance execution host 202. Instance execution host 202 returns aload operation to durable instance manager 201. The load operationindicates that Instance 123 is to be loaded at instance execution host202. Durable instance manager 201 can then load Instance 123 fromdurable storage to instance execution host 202, transitioning instance123 to an executing state.

In some environments, there may be multiple instances of the same type.Thus, it may be beneficial for an instance execution host to be informedof activation in a normalized manner with two distinct event types. Twolevels of activation may be appropriate when an instance execution hostimplements an optimization whereby types are only loaded on-demand.First, the instance-type is made available by executing the type levelactivation. After that type is available, the instance execution hostindicates this availability to the distributed instance manager andinstance level activation events are sent to that particular host.

A durable instance manager can also keep track of the state of instanceexecution hosts. When the durable instance manager is aware of aninstance execution host that has the appropriate type available, thedurable instance manager can bypass the type level event and send theinstance activation event directly to that host.

Embodiments of the invention can send activation events to an instanceexecution host in response to a variety of different re-activationconditions, including expiration of a timer, graceful shutdown of aninstance execution host, and detected failure of an instance executionhost. To facilitate appropriate re-activation of an instance, a systemproperty can be stored along with the instance in instance store 103.The system property can define one or more conditions, which whensatisfied, provide an indication of when the instance is to bere-activated for execution (i.e., transitioned to an executing state).

In some embodiments, an instance execution host associates a systemproperty with an instance. For example, an instance execution host candetermine that an instance is to be idle until a specified wake up time.In response, the instance execution host can associate the instance witha system property representing a timer. The instance execution host canthen save the instance to durable storage. The timer can indicate thespecified wake up time, the next time the instance is to be transitionedback to an executing state. A durable instance manager can monitor thesystem property and re-activate the instance at the specified wake uptime (e.g., prior to receiving a next message). An instance executionhost may define many timers, however a durable instance manager canappropriately re-activate an instance with knowledge of the next time.

Alternately, when an instance execution host is gracefully shutdown, theinstance execution host unloads its currently executing instances.Instances are unloaded by interrupting execution and saving theinstances to durable storage. The instance execution host can associateinterrupted instances with a system property indicating that theinstances are in a “Ready To Run” state. A durable instance manager candetect the property and attempt to re-activate “Ready To Run” instances(potentially in a load balanced way) across other instance executionhosts. Thus, a “Ready To Run” property can indicate that an applicationinstance is to be re-activated either at the same execution host or atanother different execution host.

FIG. 1B illustrates another view of computer architecture 100, whereinan instance execution host associates a system property with an instancethat is to be re-activated.

As depicted in FIG. 1B, application instance 112 is executing atinstance execution host 102. In response to detecting a period ofdormancy for instance 112 or to a graceful shutdown of instanceexecution host 102, instance execution host 102 stores system property113 (e.g., a timer or “Ready To Run” indication) in application instance112. Instance execution host then sends save operation 131 to durableinstance manager 101. Durable instance manager 101 in turn sends saveoperation 131 to instance store 103 to persist application instance 112at instance store 103 (transitioning application instance 112 to apersisted state).

From time to time, durable instance manager 101 scans instance store 103for instances that are to be re-activated based on a system property.Durable instance manager 101 can detect, based on system property 113,that application instance 112 is to be re-activated (e.g., when a wakeup time is reached or application instance 112 is “Ready To Run”).Alternately, agent 111 can scan instance store 103 for instances thatare to be re-activated based on a system property. Agent 111 can detect,based on system property 113, that application instance 112 is to bere-activated. In response, agent 111 can send notification 116 todurable instance manager 101. Notification 116 can indicate thatapplication instance 112 is to be re-activated.

Durable instance manager 101 can then send load command 132 tore-activate application instance 112 at instance execution host 102.Instance execution host 102 can load application instance 112,transitioning application instance 112 to an executing state.Application instance 112 then continues to execute, such as, forexample, processing message 133.

Alternately, durable instance manager 101 can re-activate applicationinstance 112 at a different instance execution host, such as, forexample, when instance execution host 102 was gracefully shutdown. Tofacilitate activation, durable instance manager 101 can initiate one ormore of the levels of activation described in sequence diagram 200 withthe different instance execution host.

In other embodiments, a durable instance manager associates a systemproperty with an instance. A durable instance manager can be configuredto monitor the connection between an instance execution host and thedurable instance manager and configured to track the instances containedby (being executed at) an instance execution host. Generally, when thedurable instance manager detects that a connection to an instanceexecution host has been dropped, the durable instance manager changesthe state of all instances contained by the instance execution host to“Ready To Run”. The durable instance manager can detect the property andattempt to re-activate “Ready To Run” instances (potentially in a loadbalanced way) across other instance execution hosts.

FIG. 1C illustrates another view of computer architecture 100, wherein adurable instance manager associates a system property with an instancethat is to be re-activated.

As depicted in FIG. 1C, application instance 121 is executing atinstance execution host 102. Durable instance manager 101 monitors aconnection between instance execution host 102 and durable instancemanager 101. Durable instance manager 101 also tracks the instancescontained by (being executed at) instance execution host 102. Inresponse to detecting a dropped connection to instance execution host102, durable instance manager 101 changes the state of all the instancescontained by instance execution host 102 to a “Ready To Run” state.

For example, durable instance manager 101 can set system property 122 inapplication instance 121 persisted in instance store 103. Systemproperty 122 indicates that application instance 121 is in a “Ready ToRun” state.

From time to time, durable instance manager 101 scans instance store 103for instances that are to be re-activated based on a system property.Durable instance manager 101 can detect, based on system property 122indicating a “Ready To Run” state, that application instance 121 is tobe re-activated. Alternately, agent 111 can scan instance store 103 forinstances that are to be re-activated based on a system property. Agent111 can detect, based on system property 122, that application instance121 is to be re-activated. In response, agent 111 can send notification136 to durable instance manager 101. Notification 136 can indicate thatapplication instance 112 is to be re-activated.

Durable instance manager 101 can then attempt to activate a instanceexecution host to load application instance 121. To facilitateactivation, durable instance manager 101 can initiate one or more of thelevels of activation described in sequence diagram 200 for instanceexecution. For example, if a connection between instance execution host102 and durable instance manager 101 is again detected, durable instancemanager 101 can send activation events 152 to instance execution host102. Alternately, durable instance manager 101 can send activationevents 153 to instance execution host 141 (or to some other instanceexecution host).

Durable instance manager 101 can then send load command 134 tore-activate application instance 112 at the appropriate instanceexecution host (e.g., either 102 or 141). The appropriate instanceexecution host can then load application instance 121, transitioningapplication instance 121 to an executing state. Application instance 121then continues to execute, such as, for example, processing furthermessages.

FIG. 3 illustrates a flow chart of an example method 300 forre-activating an instance. Method 300 will be described with respect tothe components and data of computer architecture 100.

Method 300 includes an act of a first instance execution host, fromamong the one or more instance execution hosts, executing an applicationinstance representing a portion of an application (act 301). For examplein FIG. 1B, instance execution host 102 can be executing applicationinstance 112. Alternately in FIG. 1C, instance execution host 102 can beexecuting application instance 121.

Method 300 includes an act of determining that the application instanceis to be dormant for some amount of time before further processing ofthe application instance occurs (act 302). For example in FIG. 1B,instance execution host 102 can detect that application instance 112 isto be idle for some amount of time or that instance execution host 102is being gracefully shutdown. Alternately in FIG. 1C, durable instancemanager 101 can detect a connection between instance execution host 102and durable instance manager 101 is dropped.

Method 300 includes an act of persisting a system property in aninstance store for the application instance, the system propertycontaining information indicating that the application instance is to besubsequently re-activated for execution (act 303). For example in FIG.1B, instance execution host 102 can assign system property 113 toapplication instance 112 representing a timer or representing thatapplication instance 112 is in a “Ready To Run” state. Alternately inFIG. 1C, durable instance manager 101 can assign system property 122 toapplication instance 121 representing that application instance 121 isin a “Ready To Run” state. In either embodiment, durable instancemanager 101 can persist the system property (either 113 or 122respectively) in instance store 103.

When setting a timer or detecting a graceful shutdown, an instanceexecution host can send a save command to the durable instance managerto persist the application instance along with the system property atthe instance store. For example in FIG. 1B, instance execution host 102can send save 131 to durable instance manager 101 (which subsequentlypersists application instance 121 and system property 113 in instancestore 103, thereby transitioning application instance 112 to a persistedstate).

When setting a timer or detecting a graceful shutdown, an instanceexecution host can remove the application instance from system memorysubsequent to persisting the application instance along with the systemproperty at the instance store. For example in FIG. 1B, instanceexecution host 102 can remove application instance 112 from systemmemory.

On the other hand, when detecting a dropped connection, a durableinstance manager may not receive a save command nor be aware if anapplication instance is or is not still in system memory at an instanceexecution host. For example in FIG. 1C, upon detecting a droppedconnection to instance application host 102, durable instance managermay not receive a save command from instance execution host 102 nor beaware if application instance 121 is still contained by instanceapplication host 102.

Method 300 includes an act of a second instance execution host, fromamong the one or more instance execution hosts, registering with thedurable instance manager an interest in receiving event notificationsregarding application instances to re-activate (act 304). For example inFIG. 1B, a second instance execution host, which may be instanceexecution host 102 or some other instance execution host, can registerwith durable instance manager 101 an interest in receiving eventnotifications regarding application instances (e.g., applicationinstance 112) to re-activate. Alternately in FIG. 1C, instance executionhost 102 or instance execution host 141 can register durable instancemanager 101 an interest in receiving event notifications regardingapplication instances (e.g., application instance 121) to re-activate.

Method 300 includes an act of the second instance execution hostreceiving an event notification to re-activate the application instance,the event notification responsive to the information contained in thesystem property persisted in the instance store and registration withthe durable instance manager (act 305). For example in FIG. 1B, a secondinstance execution host, which may be instance execution host 102 orsome other instance execution host, can receive activation events inpreparation for loading application instance 112. The activation eventsare responsive to information contained in system property 113 and thesecond execution host having registered for event notifications.

Alternately in FIG. 1C, instance execution host 102 can receiveactivation events 152 or instance execution host 141 can receiveactivation events 153 in preparation for loading application instance121. Activation events 152 or 153 are responsive to informationcontained in system property 122 and instance execution host 102 or 141having registered for event notifications. Activation events canrepresent one or more levels of activation as depicted in sequencediagram 200.

Method 300 includes an act of loading the application instance at thesecond instance execution host in response to receiving the eventnotification to further process the application instance (act 306). Forexample in FIG. 1B, instance execution host 102 or some other instanceexecution host can receive load 132 to load application instance 112 inresponse to being activated to receive application instance 112.Alternately in FIG. 1C, instance execution host 102 or instanceexecution host 141 can receive load 134 to load application instance 121in response to being activated to receive application instance 121.

FIG. 4 illustrates a flow chart of an example method 400 forre-activating an instance. Method 400 will be described with respect tothe components and data of computer architecture 100.

Method 400 includes an act of durable instance manager monitoringexecution of an application instance at an instance execution host (act401). For example in FIG. 1B, durable instance manager 101 can monitorexecution of application instance 112 at instance execution host 102.Alternately in FIG. 1C, durable instance manager 101 can monitorexecution of application instance 121 at instance execution host 102.

Method 400 includes an act of the durable instance manager receiving anindication that the application instance is to be subsequentlyre-activated at an instance execution host at a future time (act 402).For example in FIG. 1B, durable instance manager 101 can receive save131 including application instance 112 and system property 113. Systemproperty 113 can represent a timer or that application instance 112 isin a “Ready To Run” state. Alternately in FIG. 1C, durable instancemanager 101 can detect that a connection between instance execution host102 and durable instance manage 101 is dropped.

Method 400 includes an act of the durable instance manager persisting asystem property corresponding to the application instance at theinstance store, the system property containing information defining are-activation condition that, when satisfied, is an indication that theapplication instance is to be re-activated for execution (act 403). Forexample in FIG. 1B, durable instance manager 101 can persist systemproperty 113 in instance store 103. Property 113 can define a wake uptime that when reached satisfies the re-activation condition.Alternately, property 113 can define that the re-activation condition isdetecting that application instance 112 is in a persistent but “Ready ToRun” state.

Alternately in FIG. 1C, durable instance manager 101 can persist systemproperty 122 in instance store 103. Property 122 can define that there-activation condition is detecting that application instance 121 is ina persistent but “Ready To Run” state.

Method 400 includes an act of the durable instance manager detecting anevent that satisfies the re-activation condition subsequent topersisting the system property corresponding to the application instance(act 404). For example in FIG. 1B, durable instance manager 101 candetect a defined wake up time or that instance 112 is in a persisted but“Ready To Run” state subsequent to persisting system property 113.Alternately in FIG. 1C, durable instance manager 101 can detect instance121 is in a persisted but “Ready To Run” state subsequent to persistingsystem property 122.

Method 400 includes an act of the durable instance manager receivingregistration requests from one or more instance execution hosts forinterest in receiving event notifications regarding applicationinstances to re-activate (act 405). For example in FIG. 1B, durableinstance manager 101 can receive a registration request from instanceexecution host 102 and/or from other instance execution hosts forinterest in receiving event notifications regarding applicationinstances (e.g., application instance 112) to re-activate. Alternatelyin FIG. 1C, durable instance manager 101 can receive a registrationrequest from instance execution host 101 and/or instance execution host141 for interest in receiving event notifications regarding applicationinstances (e.g., application instance 121) to re-activate.

Method 400 includes an act of the durable instance manager sending anevent notification to a further instance execution host to re-activatethe application instance for execution, the event notificationresponsive to detection of the event that satisfies the re-activationcondition and the registration from the instance execution host (act406). For example in FIG. 1B, durable instance manager 101 can sendactivation events to instance execution host 102 or some other instanceexecution host in response to detecting a defined wake up time or thatapplication instance 112 is in a persisted but “Ready To Run” state andthat instance execution host 102 or some other instance registered forevent notifications. Alternately in FIG. 1C, durable instance manager101 can send activation events 152 to instance execution host 102 orsend activation events 153 to instance execution host 141 in response todetecting that application instance 121 is in a persisted but “Ready ToRun” state and that instance execution host 102 or 141 some registeredfor event notifications.

Accordingly, embodiments of the invention facilitate increasedreliability through the use of persistence. Further, since the loadingand unloading of instances is monitored and controlled, a system canscale in terms of the amount of work it can handle on a particularhardware configuration.

The present invention may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. The describedembodiments are to be considered in all respects only as illustrativeand not restrictive. The scope of the invention is, therefore, indicatedby the appended claims rather than by the foregoing description. Allchanges which come within the meaning and range of equivalency of theclaims are to be embraced within their scope.

1. In a computer architecture including one or more processors andsystem memory, the computer architecture also including one or moreinstance execution hosts, a durable instance manager, and an instancestore, the one or more instance execution hosts configured to executeapplication instances in system memory, wherein application instancesinclude a unit of application state and associated execution logicrepresenting a portion of an application, the instance store configuredto durably persist application instances, the durable instance managerconfigured to receive load and save operations received from instanceexecution hosts and forward load and save operations to the instancestore for implementation, the durable instance manager configured totrack whether instances are executing in memory or are persisted, amethod for re-activating an instance, the method comprising: an act of afirst instance execution host, from among the one or more instanceexecution hosts, executing an application instance representing aportion of an application; an act of determining that the applicationinstance is to be dormant for some amount of time before furtherprocessing of the application instance occurs; an act of assigning asystem property to the instance, the system property containinginformation indicating that the application instance is to besubsequently re-activated for execution; an act of a second instanceexecution host, from among the one or more instance execution hosts,registering with the durable instance manager an interest in receivingevent notifications regarding application instances to re-activate; anact of the second instance execution host receiving an eventnotification to re-activate the application instance, the eventnotification responsive to the information contained in the systemproperty persisted in the instance store and the registration with thedurable instance manager; and an act of loading the application instanceat the second instance execution host in response to receiving the eventnotification to further process the application instance.
 2. The methodas recited in claim 1, wherein the system property is a time, the timeindicating when the application instance is to be re-activated.
 3. Themethod as recited in claim 2, wherein the act of determining that theapplication instance is to be dormant for some amount of time beforefurther processing of the application instance occurs comprises an actof the first instance execution host determining that the applicationinstance is not scheduled to receive a next event for a specified timerinterval; and wherein the act of the first instance execution hostassigning a system property the instance comprises an act of theinstance execution host assigning a timer to the application instance,the timer indicating a time when the application instance is to bere-activated to receive the next event.
 4. The method as recited inclaim 1, wherein the system property is a ready to run property, theready to run property indicating that the application instance may bere-activated at another instance execution host.
 5. The method asrecited in claim 4, wherein the act of determining that the applicationinstance is to be dormant for some amount of time before furtherprocessing of the application instance occurs comprises an act of thefirst instance execution host determining that it has received a commandto shutdown; and wherein the act of the first instance execution hostassigning a system property to the instance comprises an act of theinstance execution host assigning a ready to run state to theapplication instance in response to the shutdown command, the ready torun state indicating to the durable instance manager that theapplication instance is ready to be re-activated.
 6. The method asrecited in claim 1, wherein the first instance execution host and thesecond instance execution host are the same instance execution host. 7.The method as recited in claim 1, wherein the act of registering withthe durable instance manager an interest in receiving eventnotifications comprises an act of the second instance execution hostpolling the durable instance manager for instances to re-activate; andwherein the act of the second instance execution host receiving an eventnotification to re-activate the application instance comprises an act ofthe second instance execution host receiving the event notification inresponse to the poll request.
 8. The method as recited in claim 1,wherein the act of registering with the durable instance manager aninterest in receiving event notifications comprises an act of the secondinstance execution host providing the durable instance manager with anaddress at which the second instance execution host is waiting toreceive messages; and wherein the act of the second instance executionhost receiving an event notification to re-activate the applicationinstance comprises an act of the second instance execution hostreceiving a message containing the event notification at the providedaddress.
 9. The method as recited in claim 1, further comprising: an actof assigning the second instance execution host to a durable instancemanager, the durable instance manager configured to receive eventnotifications on behalf of one or more instance execution hosts duringperiods when the one or more instance execution hosts are not running;an act of assigning the second instance execution host an instance type,the instance type indicating the type of instances the instanceexecution host is able to process; an act of assigning an instance typeto the instance, the instance type indicating the instance type of theinstance execution host that created the instance; an act of theinstance execution host manager registering with the durable instancemanager an interest in receiving event notifications regardingapplication instances to re-activate; an act of the instance executionhost manager receiving an event notification to re-activate theapplication instance, the event notification responsive to theinformation contained in the system property persisted in the instancestore and the registration with the durable instance manager, the eventnotification containing the instance type of the application instance;an act of the instance execution host manager selecting the secondinstance execution host to process the instance, the selection of thesecond instance execution host based on the instance type of the secondinstance execution host matching the instance type of the instance; andan act of the instance execution host manager initiating running of thesecond instance execution host.
 10. The method as recited in claim 9,wherein the act of the instance execution host manager initiatingrunning of the second instance execution host comprises an act of theinstance execution host manager sending a message to a server processthat activates the second instance execution host.
 11. In a computerarchitecture including one or more processors and system memory, thecomputer architecture also including one or more instance executionhosts, a durable instance manager, and an instance store, the one ormore instance execution hosts configured to execute applicationinstances in system memory, wherein application instances include a unitof application state and associated execution logic representing aportion of an application, the instance store configured to durablypersist application instances, the durable instance manager configuredto receive load and save operations received from instance executionhosts and forward load and save operations to the instance store forimplementation, the durable instance manager configured to track whetherinstances are executing in memory or are persisted, a method forre-activating an instance, the method comprising: an act of the durableinstance manager monitoring execution of an application instance at aninstance execution host; an act of the durable instance managerreceiving an indication that the application instance is to besubsequently re-activated at an instance execution host at a futuretime; an act of the durable instance manager persisting a systemproperty corresponding to the application instance at the instancestore, the system property containing information defining are-activation condition that, when satisfied, is an indication that theapplication instance is to be re-activated for an act of the durableinstance manager detecting an event that satisfies the re-activationcondition subsequent to persisting the system property corresponding tothe application instance; an act of the durable instance managerreceiving registration requests from one or more instance executionhosts for interest in receiving event notifications regardingapplication instances to re-activate; and an act of the durable instancemanager sending an event notification to a further instance executionhost to re-activate the application instance for execution, the eventnotification responsive to detection of the event that satisfies there-activation condition and the registration from the instance executionhost.
 12. The method as recited in claim 11, wherein the act of thedurable instance manager receiving an indication that the applicationinstance is to be subsequently re-activated at an instance executionhost at a future time comprises an act of durable instance managerreceiving a command from the instance execution host, the command forupdating the state of the application instance.
 13. The method asrecited in claim 12, wherein the command for updating the state of theapplication instance indicates one of: that the instance is ready to runnow or that there is a time in the future at which the instance will beready to run; and wherein the act of the durable instance managerpersisting a system property at the instance store comprises an act ofthe durable instance manager changing the state of the applicationinstance to ready to run at the time specified by the command.
 14. Themethod as recited in claim 11, wherein the act of the durable instancemanager receiving an indication that the application instance is to besubsequently re-activated at an instance execution host at a future timecomprises an act of the durable instance manager determining that theinstance execution host has failed.
 15. The method as recited in claim14, wherein the act of the durable instance manager persisting a systemproperty at the instance store comprises an act of the durable instancemanager changing the state of the application instance to ready to runin response to detecting the failure.
 16. The method as recited in claim11, wherein the act of the durable instance manager detecting an eventthat satisfies the re-activation condition comprises an act of thedurable instance manager detecting that the application instance is in aready to run state.
 17. The method as recited in claim 11, wherein theact of the durable instance manager receiving registration requests fromone or more instance execution hosts for interest in receiving eventnotifications comprises an act of the durable instance manager receivingfrom an instance execution host an address for sending notifications forinstances to re-activate; and wherein the act of the durable instancemanager sending an event notification to a further instance executionhost to re-activate the application instance for execution comprises anact of the durable instance manager sending an event notification to theaddress received from the instance execution host.
 18. The method asrecited in claim 11, wherein the act of the durable instance managerreceiving registration requests from one or more instance executionhosts for interest in receiving event notifications comprises an act ofthe durable instance manager waiting for an instance execution host topoll the durable instance manager for instances to re-activate; andwherein the act of the durable instance manager sending an eventnotification to a further instance execution host to re-activate theapplication instance for execution comprises an act of the durableinstance manager returning the event notification in response to thepoll request.
 19. The method as recited in claim 11, further comprising:an act of the durable instance manager persisting an instance typecorresponding to the application instance at the instance store, theinstance type indicating the type of instance execution host thatcreated the instance; an act of the durable instance manager receivingregistration requests from one or more instance execution host managersfor interest in receiving event notifications regarding applicationinstances to re-activate; and an act of the durable instance managersending an event notification to one of the one or more instanceexecution host managers to re-activate the application instance forexecution, the event notification responsive to detection of the eventthat satisfies the re-activation condition and the registrations fromthe instance execution host managers, the event notification containingthe instance type of the application instance.
 20. In a computerarchitecture including one or more processors and system memory, amethod for re-activating an application instance, the method comprising:executing, at a first instance execution host, the application instance;determining, at the first instance execution host, that the applicationinstance is to be saved; saving the application instance, wherein thesaving of the application instance persists the state of the applicationinstance to a durable store; providing, at a second instance executionhost, an infrastructural endpoint for receiving requests to administerapplication instances; transmitting, to a durable instance manager, theaddress of the infrastructural endpoint for the second instanceexecution host; receiving at the second instance execution host, arequest to run the application instance; and restoring the applicationinstance to the second instance execution host to re-activate theapplication instance and return the application instance to an executingstate.
 21. The method as recited in claim 20, wherein the determinationthat the application instance is to be saved comprises a determinationthat the application instance has been idle for a predetermined durationof time.
 22. The method as recited in claim 21, wherein thepredetermined duration of time of inactivity prior to saving theapplication instance is user configured.